<?php 

include("files/php/global.php"); 
printHeader();
$arr_menu=array("","","","","");
$menu=0;
if(isset($_GET["menu"]))
    $menu=($_GET["menu"]);
if(1 == $menu)
    $arr_menu[1]="class=\"selected\"";
else if(2 == $menu)
    $arr_menu[2]="class=\"selected\"";
else if(3 == $menu)
    $arr_menu[3]="class=\"selected\"";
else if(4 == $menu)
    $arr_menu[4]="class=\"selected\"";
else
    $arr_menu[0]="class=\"selected\"";

$admin =urlencode("admin");
$user  =urlencode("user");
$ftp1  =urlencode("ftp1");
$ftp2  =urlencode("ftp2");
$stato_sistema  =urlencode("stato");

$msql  = new Db;
$msql->connect();
$sql="SELECT ftp_name FROM ftp_table";
$result=$msql->execute_select($sql);
$msql->disconnettiDB();
?>

<head>

<!-- Javascript -->

<!--<script language=JavaScript src="./files/js/alarm_ajax.js"></script>-->


<link rel="stylesheet" href="./style/vtabs.css" type="text/css" />

<link rel="stylesheet" href="./style/vtabs.css" type="text/css" />

<script src="files/js/alarm_ajax.js" type="text/javascript"></script>

<script src="files/js/jquery-1.4.2.js" type="text/javascript"></script>
<script src="files/js/jquery.tools.min.js" type="text/javascript"> </script>
<script type="text/javascript" src="files/js/jquery.tablesorter.js" > </script>
<script type="text/javascript" src="files/js/jquery.tablesorter.pager.js" > </script>

 <script id="jsPlaceHolder" type="text/javascript"></script>

<script type="text/javascript">
    var num=Math.random();

    $(document).ready(function() {

        loadPasswordTab('files/php/chpass_all.php?idParse=1&id=<?php echo $admin;?>','showDivImpo');

        var att=null;
        $("#vtab-column ul li").click(function() {
           for(i=0; i < $("#vtab-column ul li").length; i++) 
           {
                $("#vtab-column ul li")[i].getAttribute('class');
                $("#vtab-column ul li")[i].removeAttribute('class');//.removeClass("selected"); //Remove any "active" class
           }
           $(this).addClass("selected"); //Add "active" class to selected tab
           return true;
        });	
    });
   
</script>

</head>

	<div id="vtab-column">
			<ul class="tabs"> <!-- class=\"selected\" -->
                             <li <?php echo $arr_menu[0]; ?> > 
                                <a href="#" onclick="javascript:loadPasswordTab('files/php/chpass_all.php?id=<?php echo $admin;?>&idParse='+num,'showDivImpo');">Admin</a>
                             </li>
                             <li <?php echo $arr_menu[1]; ?> >  
                                <a href="#" onclick="javascript:loadPasswordTab('files/php/chpass_all.php?id=<?php echo $user;?>&idParse='+num,'showDivImpo');">User</a>
                             </li>
<!--                             <li/>  >
                                <a href="#" onclick="javascript:loadPasswordTab('files/php/chpass_all.php?id=<?php echo $ftp1;?>&idParse='+num,'showDivImpo');"><?php echo $result[1][0];?></a>
                             </li>-->
                             <li <?php echo $arr_menu[3]; ?>  >
                                <a href="#" onclick="javascript:loadPasswordTab('files/php/chpass_all.php?id=<?php echo $ftp2;?>&idParse='+num,'showDivImpo');"><?php echo $result[0][0];?></a>
                             </li>
                             <li <?php echo $arr_menu[4]; ?>  >
                                <a href="#" onclick="javascript:loadPasswordTab('files/php/chpass_all.php?id=<?php echo $stato_sistema;?>&idParse='+num,'showDivImpo');">Stato Sistema</a>
                             </li>
                             <li <?php echo $arr_menu[5]; ?>  >
                                <a href="#" onclick="javascript:loadArchivioTab('files/php/send_status_alarm.php?numPage=0&idParse='+num,'showDivImpo');">Allarmi inviati</a>
                             </li>

                        </ul>
	</div>
	  
        <div id="showDivImpo">  </div>
        
</body>
	
</html>
